import request from '@/utils/request'

// 查询万店掌门店列表列表
export function listDepartments(query) {
  return request({
    url: '/energize/departments/list',
    method: 'get',
    params: query
  })
}

// 查询万店掌门店列表详细
export function getDepartments(autoId) {
  return request({
    url: '/energize/departments/' + autoId,
    method: 'get'
  })
}

// 新增万店掌门店列表
export function addDepartments(data) {
  return request({
    url: '/energize/departments',
    method: 'post',
    data: data
  })
}

// 修改万店掌门店列表
export function updateDepartments(data) {
  return request({
    url: '/energize/departments',
    method: 'put',
    data: data
  })
}

// 删除万店掌门店列表
export function delDepartments(autoId) {
  return request({
    url: '/energize/departments/' + autoId,
    method: 'delete'
  })
}
